﻿using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Demo.Api.Data;
using Demo.Api.Entities;
using Microsoft.EntityFrameworkCore;

namespace Demo.Api.Services
{
    public class ProcessLineRepository : Repository<ProcessLineDo>
    {
        public ProcessLineRepository(DemoDbContext context) : base(context)
        {
            DataSet = Context.ProcessLines;
        }
        public async Task<IEnumerable<ProcessLineDo>> GetsAsync(long affairProcessId)
        {
            return await DataSet.Where(x => x.AffairProcessId == affairProcessId).ToListAsync();
        }
    }
}